<%-- 
    Document   : customerEditJSP
    Created on : Dec 5, 2013, 2:45:06 PM
    Author     : Istvan_Monori
--%>

<%@page contentType="text/html" pageEncoding="windows-1252"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>Customer Modification JSP</title>
    </head>
    <body>
        <h1>Customer Modification JSP</h1>

        <jsp:useBean id="customerBean" scope="request" class="com.epam.javatanf2013.services.bo.CustomerBo"/> 

        <form action="<%= request.getContextPath()%>/CustomerJSP/Edit" method="post">
            <input type="hidden" name="customer_id" value="<%= customerBean.getId()%>"/>
            <table>
                <% if (request.getAttribute("error.customer.fistname") != null) {%>
                <tr>
                    <td colspan="2"><%= request.getAttribute("error.customer.fistname")%><td>
                </tr>
                <% }%>
                <tr>
                    <td>First name:</td>
                    <td><input type="text" name="customer_firstname" value="<%=customerBean.getFirstName()%>"/></td>
                </tr>
                <% if (request.getAttribute("error.customer.lastname") != null) {%>
                <tr>
                    <td colspan="2"><%= request.getAttribute("error.customer.lastname")%><td>
                </tr>
                <% }%>
                <tr>
                    <td>Last name:</td>
                    <td><input type="text" name="customer_lastname" value="<%=customerBean.getLastName()%>"/></td>
                </tr>
                <tr>
                    <td><a href="<%= request.getContextPath()%>/CustomerJSP">Back</a></td>
                    <td><input type="submit" name="submit" value="Submit"/></td>
                </tr>
            </table>
        </form>


    </body>
</html>
